//
// Created by Castle-Moriarty on 2025/11/2.
//
#include <iostream>
using namespace std;

int* return_pointer(int* a,int* b) {
    if (*a > *b) {
        return a;
    } else {
        return b;
    }
}

int main() {
    int a{1};
    int b{2};

    cout << "before function call : " << endl;
    cout << "a : " << a << endl;
    cout << "b : " << b << endl;

    int* result = return_pointer(&a,&b);
    cout << "max result: " << *result << endl;
    ++(*result);

    cout << "after function call : " << endl;
    cout << "a : " << a << endl;
    cout << "b : " << b << endl;

    return 0;
}